<template>
  <div ref="scrollIntoView" class="copyright-box" :class="{ 'copyright-box-loop': route.meta.loopType }">
    <t-row>
      <t-col :span="12">
        <div class="title">
          <titles title="版权声明" />
        </div>
      </t-col>
    </t-row>
    <NavVue :flag="true" @top="top"></NavVue>
    <div class="title-box" v-html="commonStore.copyrightInfo" :style="{ fontSize: store.styleInfo.fontSize }"></div>
  </div>
</template>
<script lang="ts">
import { defineComponent, onActivated } from 'vue';
export default defineComponent({
  name: 'templateHome',
});
</script>
<script setup lang="ts">
// @ts-nocheck
import NavVue from './wapComponents/nav.vue';
import { ref } from 'vue';
import { copyrightSave, copyrightInfo } from '@/api/templates/templates';
import heardTitle from './heardTitle.vue';
import { useProjectStore, commonDataStore } from '@/store';
import titles from '@/wap/wapPage/wapComponents/title/title.vue';
import { useRoute } from 'vue-router';
const scrollIntoView = ref(null);
const commonStore = commonDataStore();
commonStore.GetCopyrightInfo();
const route = useRoute();
const loading = ref(true);
const store = useProjectStore();
const Description = ref('');
// const init = async () => {
//   try {
//     let { data } = await copyrightInfo(localStorage.getItem('projectId'));
//     console.log(data);
//     if (data) {
//       Description.value = data;
//     }
//     loading.value = false;
//   } catch {
//     loading.value = false;
//   }
// };
// init();
onActivated(() => {
  // console.log('激活');
});
const top = () => {
  if (scrollIntoView) {
    scrollIntoView.value.scrollIntoView({ behavior: 'smooth', block: 'start' });
  }
};
</script>

<style lang="less" scoped>
.title-box {
  // font-size: 17px;
  min-height: 430px;
  font-weight: 400;
  font-size: 34px;
  line-height: 40px;
  color: #333333;
  line-height: 32px;
  // margin-top: 50px;
  p {
    font-size: 34px;
    line-height: 40px;
    font-family: none;
  }
  :deep(p) {
    font-family: none;
  }
  :deep(div) {
    font-family: none;
  }
}
.copyright-box {
  padding: 24px 16px;
  width: 100%;
  // margin: 0 auto;
  // height: calc(100vh - 28px);
  overflow: auto;
  padding-top: 74px;
}
.copyright-box-loop {
  // min-height: calc(@screen-hw-div-parent-btn-loop - 138px);
}
.t-row {
  margin: 0;
}
.title {
  display: flex;
  justify-content: center;
  align-items: center;
  // margin-top: 50px;
}
:deep(p, div) {
  margin-bottom: 16px;
  text-align: justify;
  line-height: 30px;
  text-indent: 2em;
}
</style>
